<template>
	<view class="metaverse">
		<view class="metaverse-ul plr-20 pt-30">
			<view class="mb-20 radius-10 metaverse-li" v-for="(item,index) in list" :key="index" @click="toDetails(item.id)">
				<image :src="item.image" mode="aspectFill" class="homeImg"></image>
				<view class="pt-20 pr-30 pb-30 pl-20 radius-20" >
					<view class="flex-1 size-30 f-bold ell1" style="color: #3c3c3c">{{ item.title }}</view>
					<view class="mt-10 size-24" style="color: #7c7c7c">{{ item.updatetime }}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				page:1,//分页
				pages:0,//总页数
			};
		},
		methods:{
			toDetails (id) {
				uni.navigateTo({
					url:`/pages/home/metaverseMessage?id=${id}`
				})
			},
			//获取元宇宙互联
			getyuanYuZhou () {
				this.$http('api/Newapi/yuanYuZhou',{page:this.page}).then(res=>{
					this.list = this.page == 1 ? res.data : [...this.list,...res.data]
					this.pages = res.last_page
				})
			}
		},
		onLoad() {
			this.getyuanYuZhou()
		}
	}
</script>
<style>
	page {
		background: #0A0B20;
	}
</style>
<style lang="scss" scoped>
	page{
		background-color: #f5f5f5;
	}
.metaverse-li{
	background-color: #fff;
}
.homeImg {
	width: 100%;
	display: block;
	height: 290rpx;
	border-radius: 20rpx 20rpx 0 0;
}
</style>
